package lng.site.tatoo.dao;

import java.util.List;
import java.sql.Timestamp;

import lng.site.tatoo.IDao.TatooMantisUserIDAO;
import lng.site.tatoo.model.TatooMantisUser;
import lng.site.tatoo.model.TatooMantisUserPK;

import org.hibernate.criterion.Restrictions;

/**
*
 */
public class TatooMantisUserDAO extends
		AbstractDAO<TatooMantisUser, TatooMantisUserPK> implements
		TatooMantisUserIDAO {

	/**
	 * Find TatooMantisUser by tatooMantisId
	 */
	@SuppressWarnings("unchecked")
	public List<TatooMantisUser> findByTatooMantisId(Integer tatooMantisId) {
		return findByCriteria(Restrictions.eq("tatooMantis.tatooMantisId", tatooMantisId));
	}
	
	/**
	 * Find TatooMantisUser by tatooUserId
	 */
	@SuppressWarnings("unchecked")
	public List<TatooMantisUser> findByTatooUserId(Integer tatooUserId) {
		return findByCriteria(Restrictions.eq("tatooUser.tatooUserId", tatooUserId));
	}
	
	/**
	 * Find TatooMantisUser by date
	 */
	public List<TatooMantisUser> findByDate(Timestamp date) {
		return findByCriteria(Restrictions.eq("date", date));
	}


}
